package core.action;

import java.util.ArrayList;
import java.util.List;
public class BaseAction{
	protected String messageLink;
	protected String messageTitle;
	protected int messageSuccess;	
	protected String successResultValue;
	protected String jsonString = "{success:true}";
	
	public String execute() throws Exception{
		//this.Urlname();
		return "success";
	}
	
	public List<String> getSubString(String str){
		List<String> list=new ArrayList<String>();
		list.add(str.substring(0,4));
		list.add(str.substring(4, 5));
		list.add(str.substring(5));
		return list;
	}

	public void MessageJump(String messageTitle,String messageLink){
		this.setMessageTitle(messageTitle);
		this.setMessageLink(messageLink);
		this.setMessageSuccess(messageLink.equals("BACK")?0:1);
	}
	
	public void p(Object p){
		System.out.println(p);
	}

	public String getJsonString() {
		return jsonString;
	}

	public void setJsonString(String jsonString) {
		this.jsonString = jsonString;
	}

	public String getSuccessResultValue() {
		return successResultValue;
	}

	public String getMessageLink() {
		return messageLink;
	}

	public void setMessageLink(String messageLink) {
		this.messageLink = messageLink;
	}

	public String getMessageTitle() {
		return messageTitle;
	}

	public void setMessageTitle(String messageTitle) {
		this.messageTitle = messageTitle;
	}

	public int getMessageSuccess() {
		return messageSuccess;
	}

	public void setMessageSuccess(int messageSuccess) {
		this.messageSuccess = messageSuccess;
	}

}
